import os
import pandas as pd
import logging

logging.basicConfig(level=logging.INFO)

pj_root = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../')

task = 'val'  # val, valall, test

if task == 'val' or task == 'valall':
  dataset = 'val'  # these tasks share one dataset
elif task == 'test':
  dataset = 'test'

kfold = True
kfold_k = 4

# import xgboost
# model = xgboost.XGBClassifier
# model_para = dict(
#     max_depth=5,
#     n_estimators=18,
#     base_score=0.5,
#     learning_rate=0.06,
#     objective='rank:pairwise',
#     min_child_weight=100,
#     subsample=0.75,
#     # silent=False
# )

# from sklearn.ensemble import RandomForestClassifier
# model = RandomForestClassifier
# model_para = {'n_estimators': 200, 'min_samples_leaf': 5, 'max_depth': 7, 'criterion': 'entropy', 'max_features': 'sqrt'}



import xgboost
m1 =  xgboost.XGBClassifier(
**dict(
    max_depth=5,
    n_estimators=20,
    base_score=0.5,
    learning_rate=0.06,
    objective='rank:pairwise',
    min_child_weight=100,
    subsample=0.75,
    # silent=False
)
)

from sklearn.ensemble import RandomForestClassifier
m2 = RandomForestClassifier( **{'n_estimators': 200, 'min_samples_leaf': 5, 'max_depth': 7, 'criterion': 'entropy', 'max_features': 'sqrt'})

from .ensemble import rank_ensemble 

model = rank_ensemble
model_para = {
    'models': [m1, m2],
    'weight': [8, 2]
}


model_para_a = dict(max_depth=5,
                    n_estimators=40,
                    base_score=0.5,
                    )

drop_columns = ['a_feature', 'UserInfo_270']


select_columns = []

# select_columns = ['UserInfo_82', 'UserInfo_222', 'UserInfo_242', 'UserInfo_130', 'UserInfo_149', 'UserInfo_13', 'UserInfo_262', 'UserInfo_197', 'UserInfo_27', 'UserInfo_40', 'UserInfo_109', 'UserInfo_100', 'UserInfo_203', 'ProductInfo_47', 'UserInfo_253', 'UserInfo_16', 'UserInfo_37', 'UserInfo_28', 'UserInfo_147', 'UserInfo_113', 'ProductInfo_151', 'ProductInfo_182', 'UserInfo_134', 'UserInfo_12', 'ProductInfo_90', 'ProductInfo_89', 'UserInfo_108', 'UserInfo_76', 'ProductInfo_49', 'ProductInfo_48', 'ProductInfo_35', 'UserInfo_38', 'ProductInfo_27', 'UserInfo_17', 'UserInfo_105']

use_basic_process = False